<template>
	<div class="animate-positiona">
	<!-- <div class="page-menus">
		<div class="title" v-if="$store.state.screenToInfo.customerInfo">{{}}</div>
		<div class="right" @click="showCtrl"><i class="ion-navicon"></i></div>
	</div> -->
	<div class="page has-navbar has-tabbar" v-if="$store.state.screenToInfo.customerInfo" v-nav="{title: $store.state.screenToInfo.customerInfo.customer.customerName, showBackButton: true, showMenuButton: true, onMenuButtonClick: showCtrl}">
		<div class="page-content padding-top" style="margin-bottom: 0">
			<div class="animate-position" style="padding-top: 44px;">
				<div class="suser-info">
					<div class="suser-title">
						<div class="suser-icon">
							<img src="" onerror="javascript:this.src='static/images/avatar.png';" width="66" height="66" />
						</div>
						<div class="suser-content">
							<div class="suser-call">
								<a :href="'tel:'+res.customerPhone">{{res.customerPhone}}</a>
								<span>
									<a :href="'tel:'+res.customerPhone"><i class="ion-ios-telephone-outline"></i></a>
								</span>
							</div>
							<div class="suser-table screeninfo-table">
								<table>
									<tr>
										<td>预算：</td>
										<td><div v-if="res.customerBudgetMax">{{res.customerBudgetMin}}-{{res.customerBudgetMax}}万</div></td>
										<td>客户来源：</td>
										<td>{{res.channelName}}</td>
									</tr>
									<tr>
										<td>归属地区：</td>
										<td>{{res.provinceName}} {{res.cityName}}</td>
										<td>客户级别：</td>
										<td>{{res.levelTxt}}</td>
									</tr>
								</table>
							</div>
						</div>
						
					</div>
					<div class="suser-remarks"><span>备注：</span>{{res.remark}}</div>
				</div>
				<div class="reserve">
					<ul>
						<li>
							<div class="car-editor-title">
								买车意向
							</div>
							<list>
								<item>
									<div class="car-enitor-tr" >
										<div class="car-editor-section">
											<div class="car-editor-section-list">
												<div class="car-editor-section-item" v-for="item in res.modelList">
													<router-link :to="{path:'/car/'+item.carId}">
														<div class="car-editor-section-img">
															<img :src="imgUrl+item.carImageUrl+'.r_90xh_60'" onerror="javascript:this.src='static/images/default.png';" />
														</div>
														<div class="car-editor-section-txt">
															<h5>{{item.carTitle}}</h5>
															<span>¥{{item.carRetailPrice}}万</span>
														</div>
													</router-link>
												</div>
											</div>
										</div>
									</div>
								</item>
							</list>
						</li>
					</ul>
				</div>
			</div>
		</div>
		
	</div>
	<transition enter-active-class="animated fadeIn" leave-active-class="animated fadeOut">
		<userInfo v-if="show" @cancel="cancel" :params="res" />
	</transition>
	</div>
</template>

<script>
	import userInfo from "src/assembly/userInfo.vue";
	export default{
		name:'screenInfo',
		data(){
			return {
				show:false,
				imgUrl:imgUrl,
				res:{},
				haha:'123',
				params:{
					customer:{
						customerName:''
					}
				},
			}
		},		
		mounted(){
			// console.log(this.$store.state)
			console.log(this.$route)
			this.customerGet()
		},		
		methods:{
			showCtrl(){
				this.show=!this.show
			},
			cancel(){
				this.show = false
			},
			customerGet(){
				
				window.axios.get(baseUrl+'/crm-web/controller/resForApp/getCustomerModelList',{
					params:{
						customerShopId:this.$route.query.customerShopId
					}
				}).then((res)=>{
					// console.log(res)
					this.res = res.data.result  
				})
			}
		},
		components:{
			userInfo
		},
	}
</script>

